//////////////////////////////////////////////////////////////////////////////////
//	 Copyright 2011 by Yosef Grabivker, ryuho@homenetworksoft.com
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//////////////////////////////////////////////////////////////////////////////////

#ifndef _TASK_BAR_ICON_YG_H__
#define _TASK_BAR_ICON_YG_H__

#include "def.h"

#include <wx/taskbar.h> 

class CTaskBarIcon: public wxTaskBarIcon
{
public:
								CTaskBarIcon(class CMainWnd& wnd);
	virtual						~CTaskBarIcon(void);

	PANELTYPE					GetType() { return cPTNAT; }
	void						SetIcon(GUIBIND& bind, const wxString& strTip);
	void						ShowMainWnd();

protected:
	void						CleanUp();
	void						BuildIcon( GUIBIND& bind );
	void						OnDblClick(wxTaskBarIconEvent& event);
	void						OnShow(wxCommandEvent& event);
	void						OnClose(wxCommandEvent& event);
	void						OnRefresh(wxCommandEvent& event);
	virtual wxMenu*				CreatePopupMenu();

	DECLARE_EVENT_TABLE()

private:
	void						DrawGrid(class wxMemoryDC& dc);
	void						DrawUsage(class wxMemoryDC& dc, GUIBIND& bind);
	void						DrawBorder(class wxMemoryDC& dc);

private:
	class CMainWnd&				m_wnd;
	wxIcon						m_icon;
};

#endif // _TASK_BAR_ICON_YG_H__
